package csel.model.entity;

import csel.model.CharacterStats;
import csel.model.CharacterStatsHolder;
import csel.model.DamageTypes;
import csel.model.items.EquippableItem;
import csel.model.items.UseableItem;
import csel.model.skills.*;

public class Sneak implements Occupation
{
    /**
     * Change this if we change its structure.
     */
    private static final long serialVersionUID = 5L;

	public Sneak()
	{
		
	}
	@Override
	public void setInitialResistances(CharacterStatsHolder cs)
	{
		cs.setResistance(DamageTypes.Direct, new Integer(25));
		cs.setResistance(DamageTypes.Electrical, new Integer(0));
		cs.setResistance(DamageTypes.Ranged, new Integer(40));
		cs.setResistance(DamageTypes.Sneaky, new Integer(50));
		cs.setResistance(DamageTypes.Tiger, new Integer(-1000));
	}

	@Override
	public CharacterStatsHolder getInitialStats() {
		CharacterStatsHolder ch = new CharacterStatsHolder();
		
		
		ch.setStat(CharacterStats.Agility, 25);
		ch.setStat(CharacterStats.Strength, 15);
		ch.setStat(CharacterStats.Intellect, 15);
		ch.setStat(CharacterStats.Hardiness, 15);
		ch.setStat(CharacterStats.Experience, 0);
		ch.setStat(CharacterStats.Speed, 10);
		ch.setStat(CharacterStats.Damage, 0);
		ch.setStat(CharacterStats.Lives, 5);
		
		return ch;
	}

	public void accept(OccupationSkillGetterVisitor ov, int level, Character c)
	{
		switch (level)
		{
		case 1:
			/* all classes */
			ov.visitPassiveSkill(new Bargain(c));
			ov.visitNonRangedSkill(new BindWounds(c));
			//ov.visitPassiveSkill(new Observation(c));
			/* sneak-specific */
			ov.visitNonRangedSkill(new PickPocket(c));
			ov.visitRangedSkill(new DetectTrap(c));
			ov.visitRangedSkill(new RemoveTrap(c));
		}
	}
	
	public String toString()
	{
		return "Sneak";
	}
	@Override
	public Inventory<EquippableItem> getStartingInventoryEquippable()
	{
		Inventory<EquippableItem> inventoryEquippable = new Inventory<EquippableItem>();
		
		return inventoryEquippable;
	}

	@Override
	public Inventory<UseableItem> getStartingInventoryUseable()
	{
		Inventory<UseableItem> inventoryUseable = new Inventory<UseableItem>();
		
		return inventoryUseable;
	}
}

